package com.reset.password.mapper;

import com.reset.password.entity.User;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.reset.password.entity.vo.UserVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author Mr.Abel
 * @since 2024-11-05
 */
@Mapper
public interface UserMapper extends BaseMapper<User> {
    // 根据邮箱查询用户
    @Select("select * from user where email = #{email}")
    User findByEmail(String email);
    // 修改密码
    @Select("update user set password = #{password} where email = #{email}")
    int updatePassword(String email, String password);
}
